From 33834b83c65fb8daee2142b19dafacc90423da7d Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 6 Mar 2025 14:48:46 +0100 Subject: [PATCH] ensure invalid file names are reported for files that are not ignored we currently notify invalid file names for files that the sync engine will not upload because they are ignored for other reasons (selective sync for example) let's first check if the file is ignored and only if the file would be uploaded, we can check the file name validity Signed-off-by: Matthieu Gallien --- src/libsync/discovery.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 1ada8a5b5..2e4fa09da 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -236,9 +236,7 @@ void ProcessDirectoryJob::process() // For windows, the hidden state is also discovered within the vio // local stat function. // Recall file shall not be ignored (#4420) - bool isHidden = e.localEntry.isHidden || (!f.first.isEmpty() && f.first[0] == '.' && f.first != QLatin1String(".sys.admin#recall#")); - if (handleExcluded(path._target, e, entries, isHidden)) - continue; + const auto isHidden = e.localEntry.isHidden || (!f.first.isEmpty() && f.first[0] == '.' && f.first != QLatin1String(".sys.admin#recall#")); const auto isEncryptedFolderButE2eIsNotSetup = e.serverEntry.isValid() && e.serverEntry.isE2eEncrypted() && _discoveryData->_account->e2e() && !_discoveryData->_account->e2e()->isInitialized(); @@ -252,6 +250,10 @@ void ProcessDirectoryJob::process() continue; } + if (handleExcluded(path._target, e, entries, isHidden)) { + continue; + } + // HACK: Sometimes the serverEntry.etag does not correctly have its quotation marks amputated in the string. // We are once again making sure they are chopped off here, but we should really find the root cause for why // exactly they are not being lobbed off at any of the prior points of processing. -- 2.30.2